﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;

namespace _8Group.MES.ISongService.MdItemType.DTO
{
    public class AddMdItemTypeDTO
    {
        /// <summary>
        /// 物料类型编码
        /// </summary>
        [MaxLength(64)]
        public string ItemTypeCode { get; set; } = string.Empty;

        /// <summary>
        /// 物料类型名称
        /// </summary>
        [Required]
        [MaxLength(255)]
        public string ItemTypeName { get; set; } = string.Empty;

        /// <summary>
        /// 父类型ID
        /// </summary>
        [Required]
        public long ParentTypeId { get; set; } = 0;

        /// <summary>
        /// 所有父节点ID（当前节点所有层级的父节点，各值之间用逗号分隔）
        /// </summary>
        [MaxLength(255)]
        public string Ancestors { get; set; } = string.Empty;

        /// <summary>
        /// 物料产品标识（物料 item 产品 product）
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string ItemOrProduct { get; set; } = string.Empty;

        /// <summary>
        /// 排序顺序
        /// </summary>
        public int OrderNum { get; set; } = 1;

        /// <summary>
        /// 是否启用（默认 'Y'）
        /// </summary>
        [Required]

        public char EnableFlag { get; set; } = 'Y';

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(300)]
        public string Remark { get; set; } = "备注";

        /// <summary>
        /// 创建人
        /// </summary>
        [MaxLength(64)]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; } = DateTime.Now;
    }
}
